Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUI race condition fix #1101

Merged
merged 6 commits into from
Sep 14, 2023
Merged

RUI race condition fix #1101

merged 6 commits into from
Sep 14, 2023

Conversation

edlu77
Copy link
Collaborator

@edlu77 edlu77 commented Sep 8, 2023

Made a fix to resolve the race condition issue in #1089

The unwanted registration popup issue comes up when there is a large delay between DOMContentLoaded and populating the values in the ccf-rui element. The workaround for now is to inject the element after updating the values (see webcomponent-async-inject-example.html).

@edlu77 edlu77 requested review from axdanbol and bherr2 September 8, 2023 21:50
@edlu77 edlu77 self-assigned this Sep 8, 2023
@edlu77 edlu77 changed the title R UI race condition fix RUI race condition fix Sep 8, 2023
filterNulls(),
tap(reg => this.editRegistration(reg as SpatialEntityJsonLd))
).subscribe();
this.refData.getSourceDB().subscribe(db => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this may cause the database to be loaded twice. Instead listen to the refData state (or part of it) and then subscribe to that.

tap(reg => this.editRegistration(reg as SpatialEntityJsonLd))
).subscribe();
this.refData.getSourceDB().subscribe(db => {
this.refData.setState(db);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already done in the reference data state

@sonarcloud
Copy link

sonarcloud bot commented Sep 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@axdanbol axdanbol merged commit 04dfdf1 into develop Sep 14, 2023
4 checks passed
@axdanbol axdanbol deleted the RUI-race-condition-fix branch September 14, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants